// BreakPoint.h: interface for the CBreakPoint class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BREAKPOINT_H__AC36F883_2DC4_11D3_BD77_00C04F9902DF__INCLUDED_)
#define AFX_BREAKPOINT_H__AC36F883_2DC4_11D3_BD77_00C04F9902DF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "MyTypedef.h"
#include <Afxtempl.h>

struct OneBreakPoint
{
    word address;
    byte data;
    BOOL bEnabled;
    int m_nSrcLine;   // equivalent position in source file
};

class CBreakPoint  
{
public:
	void DeleteAllBkPt();
	unsigned		GetCount();
	void			AddBreakPoint(word address,byte op,int nSrcLine=0, BOOL initial_state=TRUE);
	OneBreakPoint*	NextBreakPoint();
	OneBreakPoint*	FirstBreakPoint();
	BOOL			IsBkPtEnabled(word addr);
	POSITION		Search(word addr);
	void			EnableBkPt(word addr,BOOL bEnable=TRUE);
	int				IsABkPt(word address);
	int				DeleteBkPtAt(int nLocation);
	int				DeleteBkPt(word address);
    void			DeleteAll();
    int				GetDataAtBkPt(word address);
	void			Init();

	CBreakPoint();
	virtual ~CBreakPoint();

protected:
    CList<OneBreakPoint ,OneBreakPoint&> m_cBkPt;
    POSITION m_pos;   // used in looping through the breakpoint list
};

#endif // !defined(AFX_BREAKPOINT_H__AC36F883_2DC4_11D3_BD77_00C04F9902DF__INCLUDED_)
